import 'package:flutter/material.dart';


class SecondPage extends StatelessWidget{
  Widget build(BuildContext context){
    return new MaterialApp(
        title: '整体标题',
        home: new Scaffold(
          appBar: AppBar(
            title: Text('标题33'),
          ),
          body:  Flex(
            direction: Axis.horizontal, //方向 Axis.horizontal横向 Axis.vertical竖向
            children: <Widget>[
              Container( // Container不参数等分，剩余宽度按比例分配
                width: 50,
                height: 300,
                color: Colors.black,
              ),
              Expanded(  //Flex下的Expanded必定参与等分，有Expanded标签，里边就必有flex属性
                  flex: 1,
                  child: Container(
                    height: 300,
                    color: Colors.red,
                    child: Text("fsdas"),
                  )
              ),
              Expanded(
                  flex: 1, //
                  child: Container(
                    height: 300,
                    color: Colors.blue,
                  )
              ),
              Expanded(
                  flex: 1,
                  child: Container(
                    height: 300,
                    color: Colors.yellow,
                  )
              )
            ],
          ),




        )
    );
  }
}
